3.1.35 \(\int \csc ^6(c+d x) (a+a \sec (c+d x))^2 \, dx\) [35]

Optimal. Leaf size=129 \[ \frac {2 a^2 \tanh ^{-1}(\sin (c+d x))}{d}-\frac {4 a^2 \cot (c+d x)}{d}-\frac {5 a^2 \cot ^3(c+d x)}{3 d}-\frac {2 a^2 \cot ^5(c+d x)}{5 d}-\frac {2 a^2 \csc (c+d x)}{d}-\frac {2 a^2 \csc ^3(c+d x)}{3 d}-\frac {2 a^2 \csc ^5(c+d x)}{5 d}+\frac {a^2 \tan (c+d x)}{d} \]

[Out]

2*a^2*arctanh(sin(d*x+c))/d-4*a^2*cot(d*x+c)/d-5/3*a^2*cot(d*x+c)^3/d-2/5*a^2*cot(d*x+c)^5/d-2*a^2*csc(d*x+c)/
d-2/3*a^2*csc(d*x+c)^3/d-2/5*a^2*csc(d*x+c)^5/d+a^2*tan(d*x+c)/d

________________________________________________________________________________________

Rubi [A]
time = 0.17, antiderivative size = 129, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 8, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.381, Rules used = {3957, 2952, 3852, 2701, 308, 213, 2700, 276} \begin {gather*} \frac {a^2 \tan (c+d x)}{d}-\frac {2 a^2 \cot ^5(c+d x)}{5 d}-\frac {5 a^2 \cot ^3(c+d x)}{3 d}-\frac {4 a^2 \cot (c+d x)}{d}-\frac {2 a^2 \csc ^5(c+d x)}{5 d}-\frac {2 a^2 \csc ^3(c+d x)}{3 d}-\frac {2 a^2 \csc (c+d x)}{d}+\frac {2 a^2 \tanh ^{-1}(\sin (c+d x))}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]^6*(a + a*Sec[c + d*x])^2,x]

[Out]

(2*a^2*ArcTanh[Sin[c + d*x]])/d - (4*a^2*Cot[c + d*x])/d - (5*a^2*Cot[c + d*x]^3)/(3*d) - (2*a^2*Cot[c + d*x]^
5)/(5*d) - (2*a^2*Csc[c + d*x])/d - (2*a^2*Csc[c + d*x]^3)/(3*d) - (2*a^2*Csc[c + d*x]^5)/(5*d) + (a^2*Tan[c +
 d*x])/d

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 276

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 308

Int[(x_)^(m_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Int[PolynomialDivide[x^m, a + b*x^n, x], x] /; FreeQ[{a,
b}, x] && IGtQ[m, 0] && IGtQ[n, 0] && GtQ[m, 2*n - 1]

Rule 2700

Int[csc[(e_.) + (f_.)*(x_)]^(m_.)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(1 + x^2)^((
m + n)/2 - 1)/x^m, x], x, Tan[e + f*x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n)/2]

Rule 2701

Int[(csc[(e_.) + (f_.)*(x_)]*(a_.))^(m_)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[-(f*a^n)^(-1), Subst
[Int[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Csc[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && Integer
Q[(n + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rule 2952

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^(m_), x_Symbol] :> Int[ExpandTrig[(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x]
 /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3957

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Co
s[e + f*x])^p*((b + a*Sin[e + f*x])^m/Sin[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rubi steps

\begin {align*} \int \csc ^6(c+d x) (a+a \sec (c+d x))^2 \, dx &=\int (-a-a \cos (c+d x))^2 \csc ^6(c+d x) \sec ^2(c+d x) \, dx\\ &=\int \left (a^2 \csc ^6(c+d x)+2 a^2 \csc ^6(c+d x) \sec (c+d x)+a^2 \csc ^6(c+d x) \sec ^2(c+d x)\right ) \, dx\\ &=a^2 \int \csc ^6(c+d x) \, dx+a^2 \int \csc ^6(c+d x) \sec ^2(c+d x) \, dx+\left (2 a^2\right ) \int \csc ^6(c+d x) \sec (c+d x) \, dx\\ &=\frac {a^2 \text {Subst}\left (\int \frac {\left (1+x^2\right )^3}{x^6} \, dx,x,\tan (c+d x)\right )}{d}-\frac {a^2 \text {Subst}\left (\int \left (1+2 x^2+x^4\right ) \, dx,x,\cot (c+d x)\right )}{d}-\frac {\left (2 a^2\right ) \text {Subst}\left (\int \frac {x^6}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{d}\\ &=-\frac {a^2 \cot (c+d x)}{d}-\frac {2 a^2 \cot ^3(c+d x)}{3 d}-\frac {a^2 \cot ^5(c+d x)}{5 d}+\frac {a^2 \text {Subst}\left (\int \left (1+\frac {1}{x^6}+\frac {3}{x^4}+\frac {3}{x^2}\right ) \, dx,x,\tan (c+d x)\right )}{d}-\frac {\left (2 a^2\right ) \text {Subst}\left (\int \left (1+x^2+x^4+\frac {1}{-1+x^2}\right ) \, dx,x,\csc (c+d x)\right )}{d}\\ &=-\frac {4 a^2 \cot (c+d x)}{d}-\frac {5 a^2 \cot ^3(c+d x)}{3 d}-\frac {2 a^2 \cot ^5(c+d x)}{5 d}-\frac {2 a^2 \csc (c+d x)}{d}-\frac {2 a^2 \csc ^3(c+d x)}{3 d}-\frac {2 a^2 \csc ^5(c+d x)}{5 d}+\frac {a^2 \tan (c+d x)}{d}-\frac {\left (2 a^2\right ) \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{d}\\ &=\frac {2 a^2 \tanh ^{-1}(\sin (c+d x))}{d}-\frac {4 a^2 \cot (c+d x)}{d}-\frac {5 a^2 \cot ^3(c+d x)}{3 d}-\frac {2 a^2 \cot ^5(c+d x)}{5 d}-\frac {2 a^2 \csc (c+d x)}{d}-\frac {2 a^2 \csc ^3(c+d x)}{3 d}-\frac {2 a^2 \csc ^5(c+d x)}{5 d}+\frac {a^2 \tan (c+d x)}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(317\) vs. \(2(129)=258\).
time = 0.63, size = 317, normalized size = 2.46 \begin {gather*} \frac {a^2 \cos (c+d x) \sec ^4\left (\frac {1}{2} (c+d x)\right ) (1+\sec (c+d x))^2 \left (-3840 \cos (c+d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+3840 \cos (c+d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+\csc (2 c) \csc ^4\left (\frac {1}{2} (c+d x)\right ) \csc (c+d x) (320 \sin (2 c)-596 \sin (d x)+864 \sin (2 d x)+216 \sin (c-d x)-416 \sin (c+d x)+624 \sin (2 (c+d x))-416 \sin (3 (c+d x))+104 \sin (4 (c+d x))-596 \sin (2 c+d x)-680 \sin (3 c+d x)+894 \sin (c+2 d x)+224 \sin (2 (c+2 d x))+894 \sin (3 c+2 d x)+480 \sin (4 c+2 d x)-776 \sin (c+3 d x)-596 \sin (2 c+3 d x)-596 \sin (4 c+3 d x)-120 \sin (5 c+3 d x)+149 \sin (3 c+4 d x)+149 \sin (5 c+4 d x))\right )}{7680 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]^6*(a + a*Sec[c + d*x])^2,x]

[Out]

(a^2*Cos[c + d*x]*Sec[(c + d*x)/2]^4*(1 + Sec[c + d*x])^2*(-3840*Cos[c + d*x]*Log[Cos[(c + d*x)/2] - Sin[(c +
d*x)/2]] + 3840*Cos[c + d*x]*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + Csc[2*c]*Csc[(c + d*x)/2]^4*Csc[c + d*
x]*(320*Sin[2*c] - 596*Sin[d*x] + 864*Sin[2*d*x] + 216*Sin[c - d*x] - 416*Sin[c + d*x] + 624*Sin[2*(c + d*x)]
- 416*Sin[3*(c + d*x)] + 104*Sin[4*(c + d*x)] - 596*Sin[2*c + d*x] - 680*Sin[3*c + d*x] + 894*Sin[c + 2*d*x] +
 224*Sin[2*(c + 2*d*x)] + 894*Sin[3*c + 2*d*x] + 480*Sin[4*c + 2*d*x] - 776*Sin[c + 3*d*x] - 596*Sin[2*c + 3*d
*x] - 596*Sin[4*c + 3*d*x] - 120*Sin[5*c + 3*d*x] + 149*Sin[3*c + 4*d*x] + 149*Sin[5*c + 4*d*x])))/(7680*d)

________________________________________________________________________________________

Maple [A]
time = 0.10, size = 155, normalized size = 1.20

method result size
norman \(\frac {\frac {a^{2}}{40 d}+\frac {4 a^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{15 d}+\frac {31 a^{2} \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}-\frac {5 a^{2} \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {a^{2} \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}-\frac {2 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}+\frac {2 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) \(154\)
derivativedivides \(\frac {a^{2} \left (-\frac {1}{5 \sin \left (d x +c \right )^{5} \cos \left (d x +c \right )}-\frac {2}{5 \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )}+\frac {8}{5 \sin \left (d x +c \right ) \cos \left (d x +c \right )}-\frac {16 \cot \left (d x +c \right )}{5}\right )+2 a^{2} \left (-\frac {1}{5 \sin \left (d x +c \right )^{5}}-\frac {1}{3 \sin \left (d x +c \right )^{3}}-\frac {1}{\sin \left (d x +c \right )}+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+a^{2} \left (-\frac {8}{15}-\frac {\left (\csc ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\csc ^{2}\left (d x +c \right )\right )}{15}\right ) \cot \left (d x +c \right )}{d}\) \(155\)
default \(\frac {a^{2} \left (-\frac {1}{5 \sin \left (d x +c \right )^{5} \cos \left (d x +c \right )}-\frac {2}{5 \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )}+\frac {8}{5 \sin \left (d x +c \right ) \cos \left (d x +c \right )}-\frac {16 \cot \left (d x +c \right )}{5}\right )+2 a^{2} \left (-\frac {1}{5 \sin \left (d x +c \right )^{5}}-\frac {1}{3 \sin \left (d x +c \right )^{3}}-\frac {1}{\sin \left (d x +c \right )}+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+a^{2} \left (-\frac {8}{15}-\frac {\left (\csc ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\csc ^{2}\left (d x +c \right )\right )}{15}\right ) \cot \left (d x +c \right )}{d}\) \(155\)
risch \(-\frac {4 i a^{2} \left (15 \,{\mathrm e}^{7 i \left (d x +c \right )}-60 \,{\mathrm e}^{6 i \left (d x +c \right )}+85 \,{\mathrm e}^{5 i \left (d x +c \right )}-40 \,{\mathrm e}^{4 i \left (d x +c \right )}-27 \,{\mathrm e}^{3 i \left (d x +c \right )}+108 \,{\mathrm e}^{2 i \left (d x +c \right )}-97 \,{\mathrm e}^{i \left (d x +c \right )}+28\right )}{15 d \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )^{5} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}-\frac {2 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}+\frac {2 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}\) \(171\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)^6*(a+a*sec(d*x+c))^2,x,method=_RETURNVERBOSE)

[Out]

1/d*(a^2*(-1/5/sin(d*x+c)^5/cos(d*x+c)-2/5/sin(d*x+c)^3/cos(d*x+c)+8/5/sin(d*x+c)/cos(d*x+c)-16/5*cot(d*x+c))+
2*a^2*(-1/5/sin(d*x+c)^5-1/3/sin(d*x+c)^3-1/sin(d*x+c)+ln(sec(d*x+c)+tan(d*x+c)))+a^2*(-8/15-1/5*csc(d*x+c)^4-
4/15*csc(d*x+c)^2)*cot(d*x+c))

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 144, normalized size = 1.12 \begin {gather*} -\frac {a^{2} {\left (\frac {2 \, {\left (15 \, \sin \left (d x + c\right )^{4} + 5 \, \sin \left (d x + c\right )^{2} + 3\right )}}{\sin \left (d x + c\right )^{5}} - 15 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 15 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 3 \, a^{2} {\left (\frac {15 \, \tan \left (d x + c\right )^{4} + 5 \, \tan \left (d x + c\right )^{2} + 1}{\tan \left (d x + c\right )^{5}} - 5 \, \tan \left (d x + c\right )\right )} + \frac {{\left (15 \, \tan \left (d x + c\right )^{4} + 10 \, \tan \left (d x + c\right )^{2} + 3\right )} a^{2}}{\tan \left (d x + c\right )^{5}}}{15 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^6*(a+a*sec(d*x+c))^2,x, algorithm="maxima")

[Out]

-1/15*(a^2*(2*(15*sin(d*x + c)^4 + 5*sin(d*x + c)^2 + 3)/sin(d*x + c)^5 - 15*log(sin(d*x + c) + 1) + 15*log(si
n(d*x + c) - 1)) + 3*a^2*((15*tan(d*x + c)^4 + 5*tan(d*x + c)^2 + 1)/tan(d*x + c)^5 - 5*tan(d*x + c)) + (15*ta
n(d*x + c)^4 + 10*tan(d*x + c)^2 + 3)*a^2/tan(d*x + c)^5)/d

________________________________________________________________________________________

Fricas [A]
time = 2.61, size = 206, normalized size = 1.60 \begin {gather*} -\frac {56 \, a^{2} \cos \left (d x + c\right )^{4} - 82 \, a^{2} \cos \left (d x + c\right )^{3} - 32 \, a^{2} \cos \left (d x + c\right )^{2} + 76 \, a^{2} \cos \left (d x + c\right ) - 15 \, {\left (a^{2} \cos \left (d x + c\right )^{3} - 2 \, a^{2} \cos \left (d x + c\right )^{2} + a^{2} \cos \left (d x + c\right )\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) \sin \left (d x + c\right ) + 15 \, {\left (a^{2} \cos \left (d x + c\right )^{3} - 2 \, a^{2} \cos \left (d x + c\right )^{2} + a^{2} \cos \left (d x + c\right )\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) \sin \left (d x + c\right ) - 15 \, a^{2}}{15 \, {\left (d \cos \left (d x + c\right )^{3} - 2 \, d \cos \left (d x + c\right )^{2} + d \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^6*(a+a*sec(d*x+c))^2,x, algorithm="fricas")

[Out]

-1/15*(56*a^2*cos(d*x + c)^4 - 82*a^2*cos(d*x + c)^3 - 32*a^2*cos(d*x + c)^2 + 76*a^2*cos(d*x + c) - 15*(a^2*c
os(d*x + c)^3 - 2*a^2*cos(d*x + c)^2 + a^2*cos(d*x + c))*log(sin(d*x + c) + 1)*sin(d*x + c) + 15*(a^2*cos(d*x
+ c)^3 - 2*a^2*cos(d*x + c)^2 + a^2*cos(d*x + c))*log(-sin(d*x + c) + 1)*sin(d*x + c) - 15*a^2)/((d*cos(d*x +
c)^3 - 2*d*cos(d*x + c)^2 + d*cos(d*x + c))*sin(d*x + c))

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)**6*(a+a*sec(d*x+c))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]
time = 0.49, size = 136, normalized size = 1.05 \begin {gather*} \frac {240 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 240 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + 15 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {240 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1} - \frac {345 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 35 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 3 \, a^{2}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5}}}{120 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^6*(a+a*sec(d*x+c))^2,x, algorithm="giac")

[Out]

1/120*(240*a^2*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 240*a^2*log(abs(tan(1/2*d*x + 1/2*c) - 1)) + 15*a^2*tan(1/
2*d*x + 1/2*c) - 240*a^2*tan(1/2*d*x + 1/2*c)/(tan(1/2*d*x + 1/2*c)^2 - 1) - (345*a^2*tan(1/2*d*x + 1/2*c)^4 +
 35*a^2*tan(1/2*d*x + 1/2*c)^2 + 3*a^2)/tan(1/2*d*x + 1/2*c)^5)/d

________________________________________________________________________________________

Mupad [B]
time = 1.28, size = 124, normalized size = 0.96 \begin {gather*} \frac {4\,a^2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {-39\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\frac {62\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{3}+\frac {32\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{15}+\frac {a^2}{5}}{d\,\left (8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\right )}+\frac {a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a/cos(c + d*x))^2/sin(c + d*x)^6,x)

[Out]

(4*a^2*atanh(tan(c/2 + (d*x)/2)))/d - ((32*a^2*tan(c/2 + (d*x)/2)^2)/15 + (62*a^2*tan(c/2 + (d*x)/2)^4)/3 - 39
*a^2*tan(c/2 + (d*x)/2)^6 + a^2/5)/(d*(8*tan(c/2 + (d*x)/2)^5 - 8*tan(c/2 + (d*x)/2)^7)) + (a^2*tan(c/2 + (d*x
)/2))/(8*d)

________________________________________________________________________________________